import request from '@/utils/request'

// 创建隐患
export function createHidden(data) {
    return request({
        url: '/hidden_trouble/',
        method: 'post',
        data: data
    })
}

// 修改隐患
export function updateHidden(data) {
    return request({
        url: `/hidden_trouble/${data.id}/`,
        method: 'put',
        data: data
    })
}

// 删除隐患
export function delHidden(id) {
    return request({
        url: `/hidden_trouble/${id}`,
        method: 'delete',
    })
}